package com.glela.sensitiveWords.service.impl;

import com.glela.sensitiveWords.component.SensitiveWordsFilterComponent;
import com.glela.sensitiveWords.service.SensitiveWordsFilterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by liujie 
 */
@Service("sensitiveWordsFilterService")
public class SensitiveWordsFilterServiceImpl implements SensitiveWordsFilterService {
    @Autowired
    private SensitiveWordsFilterComponent sensitiveWordsFilterComponent;

    @Override
    public boolean checkSensitiveWords(String content) {
        return sensitiveWordsFilterComponent.check(content);
    }

    @Override
    public void reloadSensitiveWordFile() throws Exception {
        sensitiveWordsFilterComponent.reloadSensitiveWordsFile();
    }
}
